package com.example.springbootblog.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.springbootblog.common.pojo.dataobject.BlogInfo;
import com.example.springbootblog.common.pojo.request.BlogRequest;
import com.example.springbootblog.common.pojo.response.BlogInfoResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 *
 *  使用接口继承 BaseMapper<BlogInfo>
 *
 */
@Mapper
public interface BlogInfoMapper extends BaseMapper<BlogInfo> {


    //    分页查询

    @Select("select * from blog_info where delete_flag = 0  order by update_time desc limit #{offset} , #{pageSize} ")
    List<BlogInfoResponse> queryBookByPage(BlogRequest pageRequest);
}
